﻿#ifndef			_LIBINI_STRING_H_
#define			_LIBINI_STRING_H_

#include <libini/header.h>


namespace Xanadu::ini
{
	class LIBINI_EXPORT string
	{
	public:
		// constructor
		string() noexcept;

		// destructor
		virtual ~string() noexcept;

	public:
		// According to the specified mark
		static std::list<std::string> split(const std::string& _String, const std::string& _Mark) noexcept;

		// Convert to uppercase
		static std::string to_upper(const std::string& _String) noexcept;

		// Convert to lowercase
		static std::string to_lower(const std::string& _String) noexcept;

	public:
		// Extract section
		static std::string extract_section(const std::string& _String) noexcept;

	public:
		// Check whether it is a wrong line of data
		static bool is_error(const std::string& _String) noexcept;

		// Check whether the line is empty
		static bool is_empty(const std::string& _String) noexcept;

		// Check whether the line is explain
		static bool is_explain(const std::string& _String) noexcept;

		// Check whether the line is section
		static bool is_section(const std::string& _String) noexcept;

		// Check whether the line is key
		static bool is_key(const std::string& _String) noexcept;
	};
}

#endif
